<!DOCTYPE html>
<html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml" xmlns:v-bind="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>计算属性</title>

</head>
<body>
<div id="app">

    您的生日为:{{birth.getFullYear()}}年{{birth.getMonth()}}月

</div>
<script src="./node_modules/vue/dist/vue.js"></script>
<script>
    var app = new Vue({
        el: "#app",
        data:{
            birthday:1529032123201 // 毫秒值
        },
        computed:{ //计算属性
            birth(){//把方法当属性使用
                return new Date(this.birthday);
            }
        }
    });
</script>


</body>
</html>